home *** CD-ROM | disk | FTP | other *** search
/ AppleScript - The Beta Release / AppleScript - The Beta Release.iso / Development Tools / Sample Applications / MenuScripter 1.0d4.1 / MenuScripter Source / MSEditions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-24  |  2.7 KB  |  109 lines  |  [TEXT/MPS ]

  1. /*
  2.     MSEditions.h
  3.     
  4.     Version 1.0d4
  5.     
  6.     Copyright © Apple Computer UK Ltd. 1992
  7.     
  8.     All rights reserved.
  9.     
  10.     Produced by : UK Developer Technical Support
  11.     AppleLink   : UK.DTS
  12. */
  13.  
  14. #ifndef __MSEDITIONS__
  15. #define __MSEDITIONS__
  16.  
  17. #include <Types.h>
  18. #include <QuickDraw.h>
  19. #include <Files.h>
  20. #include <Packages.h>
  21. #include <GestaltEqu.h>
  22. #include <Editions.h>
  23. #include <Printing.h>
  24.  
  25. #include "MSGlobals.h" 
  26. #include "MSUtils.h"
  27.  
  28. pascal void AddSection(SectHandle newSection, DPtr aDocument);
  29.  
  30. pascal void CreateSection(SectionHandle   EMSection,
  31.                                                   short           sectionID,
  32.                                                   short           theStart,
  33.                                                   short           theEnd,
  34.                                                   DPtr            aDocument,
  35.                                                   RgnHandle       theBorder);
  36.  
  37. pascal void DeleteASection(SectHandle sectToDelete, DPtr theDoc);
  38.  
  39. pascal void AssocAllSections(DPtr theDoc);
  40.  
  41. /*routines for writing out and reading in section resources*/
  42. /*rAliasType and rSectionType resources*/
  43.  
  44. pascal void ReadAllSectionResources(DPtr  aDoc);
  45.  
  46. pascal void ReadSectionRecords(DPtr  aDoc);
  47.  
  48. pascal void ReadASection(SectHandle  aSectHandle);
  49.  
  50. pascal void SaveASection(SectHandle aSection, short count);
  51.  
  52. pascal void SaveSections(DPtr aDocument);
  53.  
  54. /*routines for writing out editions*/
  55.  
  56. pascal void ReadAnEdition(SectionHandle mySectHdl);
  57.  
  58. pascal void WriteAllEditions(DPtr aDocument);
  59.  
  60. pascal void WriteAnEdition(SectionHandle mySectHdl);
  61.  
  62. /*routines for handling the section borders*/
  63.  
  64. pascal SectHandle GetSection(short theStartPos, short theEndPos, DPtr aDoc);
  65.  
  66. pascal void RecalcBorders(DPtr aDoc, Boolean invalidate);
  67.  
  68. pascal void SetSelectionRgn(TEHandle  theTEHandle,
  69.                             short     posStart,
  70.                                                         short     posEnd,
  71.                                                         RgnHandle    *theSelRgn);
  72.  
  73. pascal void ShowSectionBorders(DPtr aDoc);
  74.         
  75. pascal void DoTEPasteSectionRecalc(DPtr theDoc);
  76.         
  77. pascal void DoTEDeleteSectionRecalc(DPtr theDoc);
  78.         
  79. pascal void DoTECutSectionRecalc(DPtr theDoc);
  80.  
  81. pascal void DoTEKeySectionRecalc(DPtr theDoc, char theChar);
  82.         
  83. /*utility routines*/
  84.  
  85. pascal SectHandle GetERefCon(SectionHandle EMSection);
  86.  
  87. pascal void SetERefCon(SectionHandle  EMSection, SectHandle aSectHandle);
  88.  
  89. pascal void DeRegisterAllSections(DPtr aDoc);
  90.  
  91. pascal Handle GetHandleToText(TEHandle aTEHandle, short theStart, short theEnd);
  92.  
  93. /*now the routines for dealing with the user interface issues*/
  94.  
  95. pascal void DoSectionOptions(DPtr theDoc);
  96.  
  97. pascal void DoSubscribe(DPtr theDoc);
  98.  
  99. pascal OSErr GetEditionContainer(DPtr theDoc, FSSpec *theFSSpec);
  100.  
  101. pascal OSErr PublishText(DPtr theDoc, FSSpec *theFSSpec);
  102.         
  103. pascal Boolean KeyOKinSubscriber(char whatKey);
  104.  
  105. pascal Boolean OKToModifySelection(DPtr theDocument);
  106.  
  107. pascal void RecalcChangedSectionBorders(DPtr theDocument);
  108.  
  109. #endif